import React, {useState} from 'react';
import {Button, Dialog} from "react-ui-xmui";


const DialogDemo1 = () => {
  const [visible, setVisible] = useState(false)
  return (
    <div>
      <Button buttonType="primary" onClick={() => setVisible(!visible)}>toggle</Button>
      <Dialog visible={visible} button={[
        <Button onClick={() => {
          setVisible(false)
        }}>取消</Button>,
        <Button onClick={() => {
          setVisible(false)
        }}>关闭</Button>
      ]} onClose={() => {
        setVisible(false)
      }}>hi</Dialog>
    </div>
  );
};

export default DialogDemo1;